Re: [GENERAL] fork() bad - Mailing list pgsql-general

From Herouth Maoz
Subject Re: [GENERAL] fork() bad
Date
Msg-id l03110707b31c1917e44d@[147.233.148.111]
Whole thread Raw
In response to Re: [GENERAL] fork() bad  (Richi Plana <richip@mozcom.com>)
Responses Re: [GENERAL] fork() bad
List pgsql-general
At 17:48 +0200 on 22/03/1999, Richi Plana wrote:


> As some of you may know, I'm hacking Ascend RADIUS 2.01 to look up a
> PostgreSQL database for authentication and log to PG for accounting.
> Normally, RADIUS fork()s once for Accounting and fork()s for each
> Authentication request. That's a lot of fork()ing and establishing
> connections to the backend. It's slow, but it's better than junking
> whatever code I've written so far.
>
> If anyone can give a better suggestion, I'm all ears. Also, if anyone
> wants the code when it's done, try asking. ;^)

Why don't you try to synchronize access to the connection between the
various processes? You know, lock it in an exclusive lock, on an
inter-process basis, such that when one process accesses it, the others
have to wait. Or you can have a few connections open, so that the
bottleneck is wider. You know, like you would treat any shared object in an
inter-process environment?

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-general by date:

Previous
From: Richi Plana
Date:
Subject: Re: [GENERAL] fork() bad
Next
From: Gerard Saraber
Date:
Subject: Re: [GENERAL] fork() bad